package com.sau.pixelcart.domain.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.sau.pixelcart.domain.vo.InventoryViewVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商品实时库存表
 * </p>
 *
 * @author Inton
 * @since 2025-03-08
 */
@Data
@Builder
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("product_inventory")
@ApiModel(value="ProductInventory对象", description="商品实时库存表")
public class ProductInventory implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "库存记录ID")
    @TableId(value = "inventory_id", type = IdType.ASSIGN_UUID)
    private String inventoryId;

    @ApiModelProperty(value = "商品ID（关联product表）")
    private String productId;

    @ApiModelProperty(value = "当前库存量")
    private Integer stock;

    @ApiModelProperty(value = "低库存预警阈值")
    private Integer lowStockThreshold;

    @ApiModelProperty(value = "最后更新时间")
    private LocalDateTime lastUpdated;

    @ApiModelProperty(value = "库存版本")
    private Long version;


}
